import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Switch here.
 * 
 * @author Christian Pérez Zavalija
 * @version 25-Jun-2013
 */
public class Switch extends Actor
{
    private GreenfootImage []imgswhitch;
    
    /**
     * Load the images in an array and displays the Switch-off.
     */
    public Switch()
    {
        imgswhitch=new GreenfootImage[2];
        imgswhitch[0]=new GreenfootImage("switch-off.png");
        imgswhitch[1]=new GreenfootImage("switch-on.png");
        setImage(imgswhitch[0]);
    }
    
    /**
     * Changes the image to LED-off.
     */
    public void OFF()
    {
        setImage(imgswhitch[0]);
    }
    
    /**
     * Changes the image to Switch-on.
     */
    public void ON()
    {
        setImage(imgswhitch[1]);
    }
}
